<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
    	#editroletable{
    		text-align:center;
    		margin:0px auto;
    		width: 350px;
    	}
    	table{
    		border-style: groove;
    		border-color:  	#1E90FF;
    	}
    </style>
</head>
<script type="text/javascript" src= "<%=basePath%>js/sys/appversion/index.js" ></script>
<script type="text/javascript" src= "<%=basePath%>js/jsUtils.js" ></script>
<body>
<div>
    <div style="padding-bottom: 10px;">
        <form class="form-inline" id = "search-form">
            <div class="form-group">
                <label for="versionNo">版本号</label>
                <input type="text" class="form-control" id="versionNo" name="versionNo" placeholder="模糊查询版本号">
            </div>
            <div class="form-group">
                <label for="subscribe">主题</label>
                <input type="text" class="form-control" id="subscribe" name="subscribe" placeholder="模糊查询主题">
            </div>
            <div class="form-group">
                <label for="appType">app类型</label>
                <select class="form-control" id="appType" name="appType">
                    <option value="">--请选择--</option>
                    <option value="1">车主APP</option>
                    <option value="2">发卡APP</option>
                </select>
            </div>

            <a  class="btn btn-primary" href="javascript:void(0);" id="search_button" ><i class="glyphicon glyphicon-search"></i>查询</a>
        </form>

    </div>
    <div class="tools" style="padding-bottom: 5px;">
        <button class="btn btn-primary btn-sm" type="button" id="add_button"><i class="glyphicon glyphicon-plus"></i> 添加</button>
        <button class="btn btn-primary btn-sm" type="button" id="remove_button"><i class="glyphicon glyphicon-trash"></i> 删除</button>
    </div>
    <div id="datagrid" style=" margin-top: 15px;"></div>
    <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="editModalLabel">新增版本</h4>
                </div>
                <div class="modal-body">
                    <form id="appVersionForm" class="form-horizontal">
                        <input type="hidden" name="id" id="appVersionId"  />

                        <!--<div class="form-group" >-->
                        <fieldset class="plan-left-info-fieldset">
                            <legend><span>版本信息</span></legend>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="required">*</span>版本号</label>
                                <div class="col-sm-10">
                                    <input type="text" maxlength="16" class="form-control"  name="versionNo"
                                           placeholder="请输入版本号" data-easyform="length:1 16;char-chinese;"
                                           data-message="请输入版本号">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="required">*</span>主题</label>
                                <div class="col-sm-10">
                                    <input type="text" maxlength="16" class="form-control"  name="subscribe"
                                           placeholder="请输入主题" data-easyform="length:1 16;char-chinese;"
                                           data-message="请输入主题">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="required">*</span>下载地址</label>
                                <div class="col-sm-10">
                                    <input type="text" maxlength="256" class="form-control"  name="url"
                                           placeholder="请输入下载地址" data-easyform="length:1 256;char-chinese;"
                                           data-message="请输入下载地址">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="required">*</span>发布时间</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control form_datetime" id="publishTime" name="publishTime" placeholder="请输入发布时间">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">APP类型</label>
                                <div class="col-sm-10">
                                    <label class="radio-inline">
                                        <input type="radio" name="appType" id="appType1" value="1"> 车主APP
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="appType" id="appType2" value="2"> 发卡APP
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否强制更新</label>
                                <div class="col-sm-10">
                                    <label class="radio-inline">
                                        <input type="radio" name="isForce" id="isForce1" value="1"> 是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="isForce" id="isForce2" value="0"> 否
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">描述说明</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control"  name="content"
                                              data-easyform="char-chinese;length:1 64;"
                                              data-easytip="position:top;"
                                              data-message="内容只能为中文、英文、数字、下划线、中文标点符号，且长度不得超过128个字符"></textarea>
                                </div>
                            </div>

                        </fieldset>
                        <!--</div>-->

                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" >取消</button>
                    <button type="button" class="btn btn-primary" id="saveRole" onclick="AppVersion.save();">保存</button>
                </div>
            </div>
        </div>
    </div>


</div>
<script type="text/javascript">
    $('.form_datetime').datetimepicker({
        format: 'yyyy-mm-dd',
        autoclose: true,
        todayBtn: true,
        /*       startView: 'year',
         minView:'hour', */
        maxView:'decade',
        language:  'zh-CN',
    });
</script>
</body>
</html>
